//
//  CTCommentViewController.h
//  cactus
//
//  Created by wd on 11-12-1.
//  Copyright 2011年 ifeng. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "CTCommentTable.h"
#import "InputView.h"
#import "CTCommentViewControllerDelegate.h"
#import "CLBaseViewController.h"

@interface CTCommentViewController : CLBaseViewController<UITextFieldDelegate,UITextViewDelegate,UIAlertViewDelegate,InputViewDelegate,CTCommentViewControllerDelegate,callBack> {
  
  CTCommentTable *ctContent;
  NSString *currentTitle;//返回title
  NSString *docTitle;//题目
  NSString *documentId;//文章Id
  NSString *ip;//ip
  NSString *wwwUrl;//url
  NSString *commentType;//是否可评
  BOOL isReplayComment;//标识是否为回复评论
  UIView *headerView;
  UILabel *headerLabel;
  UIView *alertHeaderView;//顶部提示view
  UILabel *alertHeaderLabel;
  BOOL is4Push;
  NSString *objectId;
  UIImageView *assistantView;
  NSDictionary *currentCommentSourceData;   //表示当前被点击的评论的数据源
  float keyboardHeight;
  CGPoint currentClickedPoint;             //表示当前点击的点
  NSString *docUrl;                        //表示文章url
  NSDictionary *hottestComments;
  NSIndexPath *selectedIndexPath;
  NSMutableArray *supportedIndexPaths;
  NSInteger floorParrentsArrayIndex;
  NSNumber *cellLevel;
  UIActivityIndicatorView *waitingView;
    UIView *backGroundView;
  NSString *strCurrentComment;//当前评论内容
}
@property (nonatomic, strong) NSString *wwwUrl,*commentType,*uuid,*currentTitle,*docTitle,*ip ,*documentId,*docType,*docLinkUrl;
@property (nonatomic, strong) IBOutlet UIView *headerView;
@property (nonatomic, strong) IBOutlet UILabel *headerLabel;
@property (nonatomic, strong) CTCommentTable *ctContent;
@property (nonatomic, assign) BOOL is4Push;
@property (nonatomic, assign) BOOL isReplayComment;
@property (nonatomic)  UIView *alertHeaderView;
@property (nonatomic)  UILabel *alertHeaderLabel;

@property (nonatomic, strong) UIImageView *assistantView;
@property (nonatomic, strong) NSDictionary *currentCommentSourceData;
@property (nonatomic, strong) InputView *inputView;
@property (nonatomic, strong) NSString *docUrl;
@property (nonatomic, strong) NSDictionary *hottestComments;
@property (nonatomic, strong) NSIndexPath *selectedIndexPath;
@property (nonatomic, assign) NSInteger floorParrentsArrayIndex;//评论盖楼层，从1开始，0表示当前层
@property (nonatomic, strong) NSNumber *cellLevel;
@property (nonatomic, strong) NSMutableArray *supportedIndexPaths;
@property (nonatomic, strong) UIActivityIndicatorView *waitingView;
@property (nonatomic,strong) NSDictionary *commentsDataDic;
@property (nonatomic,assign,getter = isPageComment) BOOL pageComment;

@property (nonatomic,strong) NSDictionary *responseObject;
@property (nonatomic,assign) BOOL isNeedRequest;
@property (nonatomic,strong) NSString *strCurrentComment;//当前评论内容
@property (nonatomic,assign) BOOL isNavgShowed;

@property (nonatomic,strong) NSString *commentTopicId;

@property (nonatomic,strong)NSString *fromtype;

@property (nonatomic,weak)UIView *shareView;

@property (nonatomic,strong)UIImage *captureImg;
@property (nonatomic,strong)NSString *shareUrl;




-(void)initWithData:(NSString *)url;
-(void)initialization;
-(void)createTable;
- (BOOL)isSupportedComment:(NSIndexPath *)currentIndexPath;
- (void)updateCSS;

- (void)showCommentDic:(NSDictionary *)commentsDic;

-(void)setCommentFail;

- (void)setDocEntity:(NSDictionary *)entity;

- (void)setCommentsURL:(NSString *)commentsURl;

- (void)setscrolltoTop:(BOOL)top;

- (void)addassistantViewwithLocateInWindow:(CGPoint)locateInWindow
                          withLocateInCell:(CGPoint)locateInCell
                            withSizeOfCell:(CGSize)sizeOfCell
                             withIndexPath:(NSIndexPath *)indexPath
                         withSourceDataDic:(NSDictionary *)sourceData
                       atParentsArrayIndex:(NSInteger)parentsArrayIndex
                                 withLevel:(NSNumber *)level
                                  withView:(UIView *)view;
- (void)getCurrentIP;

- (void)setSuperPathID:(NSString *)pathID;

- (void)reloadHeaderView;

- (void)reloadBottomView;

- (void)reloadStatuView;

- (void)nameTapWithData:(NSDictionary *)dic withIndexPath:(NSIndexPath *)indexPath;

- (void)supportClickedWihtIndexPath:(NSDictionary *)dic;
@end
